package util.delicious;

import java.util.Hashtable;

import util.io.FileInput;
import util.preprocessing.dmozExtractor;

public class Experiments {
	
	
	
	
	/**
	 * Put in hash (line,count) lines give in the file pointed by path
	 * 
	 * 
	 * @param path
	 */
	public static Hashtable<String, Integer> hashLines(String path) {

		FileInput in = new FileInput(path);

		Hashtable<String, Integer> hash = new Hashtable<String, Integer>();

		String line = in.readString();

		while (line != null) {

			line = line.trim();
			Integer c = null;

			if (hash.containsKey(line)) {

				c = hash.get(line) + 1;

			} else {
				c = new Integer(1);

			}

			hash.put(line, c);

			line = in.readString();

		}

		return hash;

	}
	
	
	
	
	
	
	
	
	
	public static void main(String[] args) {
		// TODO Auto-generated method stub

		String path = "/home/sergio/projects/data/tu_berlin/130.149.154.91/corpus/delicious/delicious.txt";

		String dmoz = "/home/sergio/projects/data/dmoz/kt/kt-content.rdf.u8";

		String a[] = new String[1];
		a[0] = "kids";
		// extractEntity(path, a);

		//extractEntityByURL(path, dmozExtractor.getURLandInfo(dmoz, 1), true);

	}
}
